public class BankAccount {
    private String ownerName; //银行卡户主名
    private int accountNumber; //银行卡号
    private float balance; //余额
    //构造函数
    public BankAccount() { this("", 0, 0); }
    public BankAccount(String initName, int initAccNum, float initBal) {
        ownerName = initName;
        accountNumber = initAccNum;
        balance = initBal;
    }
    //银行卡户主名的get&set函数
    public String getOwnerName() {  return ownerName;  }
    public void setOwnerName(String ownerName) {
        this.ownerName = ownerName;
    }
    //银行卡号的get&set函数
    public int getAccountNumber() {  return accountNumber;  }
    public void setAccountNumber(int accountNumber) {
        this.accountNumber = accountNumber;
    }
    //余额的get&set函数
    public float getBalance() {  return balance;  }
    public void setBalance(float balance) {  this.balance = balance;  }

}
